package org.six11.olive3.picturephone;

import javax.swing.JTextArea;

import org.six11.olive3.net.Message;
import org.six11.olive3.net.MessageHandler;
import org.six11.olive3.net.Message.Statement;
import org.six11.util2.Debug;

/**
 * 
 * 
 * @author Gabe Johnson <johnsogg@cmu.edu>
 * 
 */
public class ChatMessageHandler extends MessageHandler {

  private JTextArea text;
  private PicturephoneConsole console;

  public ChatMessageHandler(PicturephoneConsole console) {
    this.console = console;
    this.text = text;
  }

  public void handleLater(Message m) {
    bug("Woooo!");
    if (console == null) {
      bug("WTF the console is null");
    }
    console.addMessage(m.toOliveString());
    console.repaint();
  }

}
